home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / utils3 / speccase / !ReadMe next >
Text File  |  1994-10-18  |  6KB  |  149 lines

  1.                        Special Case Module release 0.04
  2.                        ================================
  3.  
  4. ***  Source, binaries and documentation Copyright (C) Oliver Betts, 1994  ***
  5.  
  6. This software is provided as is.  It has been tested to a reasonable extent,
  7. but probably has a few lurking bugs.  I take no responsibility for any loss
  8. or damage, directly or indirectly caused.
  9.  
  10. Versions with a letter suffix are test versions and may only be distributed
  11. with express permission from me.  Other versions may be distributed freely
  12. provided all files are supplied intact and that no profit is made.  You may
  13. bundle it with other freeware software provided these distribution
  14. restrictions are met, but please make sure you're supplying the latest
  15. version.  If you want to distribute it in some other way, get in touch.
  16.  
  17. *****************************************************************************
  18.  
  19. DOSFS and CDFS allow filenames in capital letters only, which doesn't make
  20. for readability.  This cunning module sits on the vector used by the Filer
  21. to read filenames and does on-the-fly translation of the case of filenames
  22. containing no lower-case letters.  And as a bonus, it also tells the Filer
  23. that directories have timestamps at the beginning or end of time, and this
  24. means they all get listed first or last under "Sort by date".
  25.  
  26. Files in this release:
  27.  
  28. !ReadMe    - this file
  29. SpeclCase  - the module
  30. CaseSrc    - source code
  31.  
  32. The case translation is applied to any filename not containing lower-case
  33. letters, which means that any files which you've previously copied from a
  34. DOS floppy onto your harddisc get translated too.  Since the Wimp is told
  35. the filename has mixed-case, if you copy a file from a DOS floppy to your
  36. harddisc with the module loaded, the filename on your harddisc will be in
  37. mixed-case even if you don't load the module.
  38.  
  39. The translation applied is as follows:
  40.  
  41. * If the file contains lower-case letters, no translation is done
  42.  
  43. * A single character leafname is forced to lower-case
  44.  
  45. * Any leading '!'s are skipped
  46.  
  47. * The start of the filename is checked for matches with list of words and
  48.   if a match is found, the rest of the string is checked for matches with
  49.   the word list recursively.  If any match is found, the rest of the name
  50.   is forced to lower case
  51.  
  52. * Otherwise, all letters are forced to lower-case, except for the initial
  53.   non-'!' character
  54.  
  55. The word list can be changed by editing the DATA statements at the end of
  56. the BASIC assembler source code and RUNning it.  This will reassemble the
  57. module in the current directory.
  58.  
  59. Make sure that any words which are prefixes of other words come after the
  60. words which they are prefixes of (eg. 'Desktop' needs to be before 'Desk'
  61. or it won't ever get used).  If you simply sort the words into decreasing
  62. length order you will avoid any problems.
  63.  
  64. Let me know if you find any useful words which aren't in the list.
  65.  
  66. So for example:
  67.  
  68. HELLo -> HELLo
  69. C -> c
  70. TMP -> Tmp
  71. !X -> !X
  72. !RUNIMAGE -> !RunImage (if 'Run' and 'Image' are in the word list)
  73. !!BANG!! -> !!Bang!! (0.01 gave !!bang!!)
  74. !RUNFILES -> !RunFiles (if 'Run' and 'File' are in the word list)
  75.  
  76. This scheme is arguably not perfect -- please let me know if you think of
  77. any improvements.
  78.  
  79. A minor technical note: the module translates the information returned by
  80. calls to OS_GBPB with R0=8,9,10,11 or 12.  The Filer uses R0=10 (at least
  81. in RISC OS 3.5 it does).  This means that the case translation also works
  82. with filename completion (at least it does for my LineEditor module).
  83.  
  84. Directory timestamps:
  85.  
  86. As a bonus, the returned timestamps for directories are set to either the
  87. earliest or latest time possible.  If like me, you use the "Sort by date"
  88. option this gives directories listed alphabetically after or before files
  89. in filer windows.  This demonstrates a minor bug in the RISC OS 3.5 filer
  90. which displays the latest possible time as "00:59:59 01 Jan 1900" when it
  91. should be sometime next century.  The dates sort correctly, though.  This
  92. bug isn't present in RISC OS 3.11!
  93.  
  94. Hopefully this timestamp fudging will not foul-up Impression Style, which
  95. I have heard complains if the timestamp of the !System directory changes.
  96. I'd be interested to hear if it does or doesn't work.
  97.  
  98. Comments and suggestions are greatly encouraged.  E-mail will get a reply
  99. (assuming I can get through) somewhat quicker than snail mail.  If e-mail
  100. bounces, I read the usenet group comp.sys.acorn regularly.  Please try to
  101. give as much detail as possible in bug-reports.  Steps to demonstrate the
  102. bug from loading in the module are very helpful indeed.
  103.  
  104. Several people have requested that the case translation be restictable by
  105. filing system.  I'll probably add this fairly soon.
  106.  
  107. Version 0.01 has been tested on RISC OS 3.11 and 3.50.
  108. Versions 0.02, 0.03 and 0.04 have been tested on RISC OS 3.50.
  109.  
  110. However, I can't see why they shouldn't work on any RISC OS version.  Let
  111. me know of any problems.
  112.  
  113. Olly Betts, 1994.10.17
  114.  
  115. You can fetch the latest version using anon ftp from ftp.mantis.co.uk, in
  116. the directory /pub/users/olly - the file should be scase???.arc
  117.  
  118. I'll also upload it to HENSA when it's in a reasonable unchanging state.
  119.  
  120. If you can't ftp send me an e-mail with "req-spcase" in the subject line,
  121. and my mailer will automagically mail you the latest version, uuencoded.
  122.  
  123. Internet email:         olly@mantis.co.uk
  124.  
  125. Indirected snail mail:  Olly Betts,
  126.                         24 Morgans Road,
  127.                         Hertford,
  128.                         Herts,
  129.                         SG13 8BS,
  130.                         UK
  131.  
  132. Revision History:
  133. =================
  134.  
  135. 0.04 Fixed erroneous special casing of filenames containing lower-case, but
  136.       starting with a word in the list
  137.      You can now turn off the directory sorting (assembly-time flag)
  138.      You can now capitalise the tail of the name left after matching words
  139.       from the list (so SPRITEFRED -> SpriteFred, but SPRITELY -> SpriteLy)
  140.      Extended word list
  141.  
  142. 0.03 No longer attempts to postprocess returned data on error from OS_GBPB
  143.       (Julian Wright spotted this bug and provided the fix -- Thanks)
  144.      Extended word list
  145.  
  146. 0.02 Added word list
  147.  
  148. 0.01 First version
  149.